fix: resolve clippy lints and update dependencies#65
Merged
Conversation
Migrate to use separate ctr crate following RustCrypto best practices. The aes 0.8 release removed the ctr feature, requiring use of the standalone ctr crate for AES-CTR mode operations. Changes: - Update aes dependency to 0.8 (remove ctr feature) - Add ctr 0.9 dependency - Update v1_local and v3_local cipher implementations to use new API - Add ctr feature to v1_local and v3_local feature flags All feature combinations tested and passing. Closes #54
Prevents cryptic trait conflict errors by detecting incompatible feature combinations at compile time with clear error messages. Changes: - Add compile_error! macros for conflicting public features - Configure docs.rs to avoid --all-features (use default features) - Document architectural design decisions in Cargo.toml The PASETO specification recommends using a single version per application. Multiple public features cause conflicting From<ed25519_dalek::ed25519::Error> implementations. These checks enforce this design at compile time. Error messages guide users to: - Choose only one public feature - Reference issue #48 for context - Understand this is intentional design Docs.rs configuration prevents build failures by using default features (batteries_included + v4_local + v4_public) instead of --all-features. Addresses #48
Update rand_core dependency to latest compatible version. All 8 feature combinations tested and passing: - v1_local: 12 tests passed - v2_local: 14 tests passed - v3_local: 16 tests passed - v4_local: 13 tests passed - v1_public: 8 tests passed - v2_public: 10 tests passed - v3_public: 7 tests passed - v4_public: 10 tests passed
Update thiserror dependency from 1.0.69 to 2.0.17. All tests pass across the entire feature matrix (v1-v4, local and public). Changes include automatic clippy fixes for code style issues.
Update primes from 0.3 to 0.4 in dev dependencies.
Resolve clippy::doc-lazy-continuation warnings by properly indenting continuation lines in documentation comments.
Remove redundant parentheses from impl trait parameter types in function signatures for all PASETO version implementations.
Replace ring::constant_time::verify_slices_are_equal with subtle crate's ConstantTimeEq trait for constant-time byte comparison. The subtle crate is already present as a transitive dependency and provides the same security guarantees.
Add subtle 2.6 as a direct dependency for constant-time operations. While already present as a transitive dependency, explicit declaration is required to import and use its ConstantTimeEq trait.
Use PasetoError::Cryption for MAC tag comparison failures instead of non-existent InvalidToken variant. This maintains security by providing a general unspecified cryptographic error.
Use bool::from() for explicit type conversion of subtle::Choice to bool to satisfy type inference requirements.
rrrodzilla
marked this pull request as ready for review
October 5, 2025 19:46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ring::constant_time::verify_slices_are_equalwithsubtlecrateChanges
subtle::ConstantTimeEqfor constant-time comparisonsaes(0.7→0.8),thiserror(1.x→2.0),rand_core(0.6→0.9),primes(0.3→0.4)Impact
-D warningsenabledsubtlecrate